unsigned long do_iret(void)
{
struct cpu_user_regs *regs = guest_cpu_user_regs();
+ struct vcpu *v = current;
u32 eflags;
/* Check worst-case stack frame for overlap with Xen protected area. */
}
/* No longer in NMI context. */
- current->nmi_masked = 0;
+ v->nmi_masked = 0;
/* Restore upcall mask from supplied EFLAGS.IF. */
- current->vcpu_info->evtchn_upcall_mask = !(eflags & X86_EFLAGS_IF);
+ vcpu_info(v, evtchn_upcall_mask) = !(eflags & X86_EFLAGS_IF);
/*
* The hypercall exit path will overwrite EAX with this return
exit_and_crash:
gdprintk(XENLOG_ERR, "Fatal error\n");
- domain_crash(current->domain);
+ domain_crash(v->domain);
return 0;
}
unsigned int compat_iret(void)
{
struct cpu_user_regs *regs = guest_cpu_user_regs();
+ struct vcpu *v = current;
u32 eflags;
/* Trim stack pointer to 32 bits. */
* mode frames).
*/
const struct trap_info *ti;
- u32 x, ksp = current->arch.guest_context.kernel_sp - 40;
+ u32 x, ksp = v->arch.guest_context.kernel_sp - 40;
unsigned int i;
int rc = 0;
if ( rc )
goto exit_and_crash;
regs->_esp = ksp;
- regs->ss = current->arch.guest_context.kernel_ss;
+ regs->ss = v->arch.guest_context.kernel_ss;
- ti = ¤t->arch.guest_context.trap_ctxt[13];
+ ti = &v->arch.guest_context.trap_ctxt[13];
if ( TI_GET_IF(ti) )
eflags &= ~X86_EFLAGS_IF;
regs->_eflags = eflags & ~(X86_EFLAGS_VM|X86_EFLAGS_RF|
regs->_esp += 16;
/* No longer in NMI context. */
- current->nmi_masked = 0;
+ v->nmi_masked = 0;
/* Restore upcall mask from supplied EFLAGS.IF. */
- vcpu_info(current, evtchn_upcall_mask) = !(eflags & X86_EFLAGS_IF);
+ vcpu_info(v, evtchn_upcall_mask) = !(eflags & X86_EFLAGS_IF);
/*
* The hypercall exit path will overwrite EAX with this return
exit_and_crash:
gdprintk(XENLOG_ERR, "Fatal error\n");
- domain_crash(current->domain);
+ domain_crash(v->domain);
return 0;
}
-static long compat_register_guest_callback(struct compat_callback_register *reg)
+static long compat_register_guest_callback(
+ struct compat_callback_register *reg)
{
long ret = 0;
struct vcpu *v = current;
return ret;
}
-static long compat_unregister_guest_callback(struct compat_callback_unregister *unreg)
+static long compat_unregister_guest_callback(
+ struct compat_callback_unregister *unreg)
{
long ret;
}
/* No longer in NMI context. */
- current->nmi_masked = 0;
+ v->nmi_masked = 0;
/* Restore upcall mask from supplied EFLAGS.IF. */
- vcpu_info(current, evtchn_upcall_mask) = !(iret_saved.rflags & EF_IE);
+ vcpu_info(v, evtchn_upcall_mask) = !(iret_saved.rflags & EF_IE);
/* Saved %rax gets written back to regs->rax in entry.S. */
return iret_saved.rax;